//
//  UserAccount.h
//  Weibo
//
//  Created by student on 16/4/28.
//  Copyright © 2016年 Mcc. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UserAccount : NSObject<NSCoding>
//"access_token":"2.00VOYQ6G3LZSaD2845fb8097hUYPWC",
//"remind_in":"157679999",
//"expires_in":157679999,
//"uid":"5870150235"}

//授权信息
@property(nonatomic,copy)NSString *access_token;// 令牌
@property(nonatomic,assign)int expires_in;// 过期时间
@property(nonatomic,copy)NSString *uid; // 用户uid
@property (nonatomic,strong) NSDate *expires_Date;  // 令牌具体过期日期时间 （认证的时候+expires_in)

//用户信息
@property(nonatomic,copy)NSString *screen_name;//用户昵称
@property(nonatomic,copy)NSString *avatar_large;//用户头像地址

+(UserAccount *)sharedUserAccount;

//获取用户信息
-(void)requestUserInfo;
-(BOOL)isLogined;//判断是否登录过

- (void)requstUserInfoSuccesBlock:(void (^)(UserAccount *account))successBlock
                        failBlock:(void (^)(NSError *error))failBlock;
@end
